package cn.wolfcode.crm.query;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.shiro.util.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter@Setter
@NoArgsConstructor
@AllArgsConstructor
public class IssuePolicyQueryObj extends QueryObject{

    private String keyword;   //关键字
    private String serialNumber;  //核保单号
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date beginDate; //起保日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date endDate;  //止保日期
    private String policySn;

    public String getKeyword(){

        return StringUtils.hasLength(keyword)? keyword:null;
    }
    public String getSerialNumber(){

        return StringUtils.hasLength(serialNumber)? serialNumber:null;
    }
    public String getPolicySn(){

        return StringUtils.hasLength(policySn)? policySn:null;
    }

}
